package cn.duli.myvideo.service.Impl;

import cn.duli.myvideo.mapper.MovieMapper;
import cn.duli.myvideo.pojo.Movie;
import cn.duli.myvideo.service.MovieService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MovieServiceImpl implements MovieService {

    @Resource
    private MovieMapper movieMapper;

    @Override
    public List<Movie> queryLike(String mName) {
        return movieMapper.queryLike(mName);
    }

    @Override
    public Page<Movie> findAll() {
        return movieMapper.findAll();
    }

    @Override
    public Movie findById(Integer mId) {
        return movieMapper.findById(mId);
    }

    @Override
    public void save(Movie movie) {
        movieMapper.save(movie);
    }

    @Override
    public void update(Movie movie) {
        movieMapper.update(movie);
    }

    @Override
    public void deleteById(Integer mId) {
        movieMapper.deleteById(mId);
    }
}
